package wells.concurrent;

import java.util.concurrent.locks.ReentrantLock;

public class ReentrantLockTest {

	private static final ReentrantLock LOCK = new ReentrantLock();

	public static void main(String[] args) {

		try {
			LOCK.lock();

			func();
		} finally {
			LOCK.unlock();
		}
	}

	private static int func() {
		int a = 5;
		a += 1;
		return a;
	}
}
